package com.anlu.pattern.action.mediator;

/**
 * <p>
 * Description:TODO 详细描述
 * <p>
 * <p>
 *
 * @author anlu
 * @date 2022/9/7 0007 0:21
 */
public class User {
    private String name;
    private ChatRoom chatRoom;

    public void login(ChatRoom room){
        //调用聊天室连接的方法
        chatRoom.connect(this);
        this.chatRoom = chatRoom;
    }

    public void talk(String msg){
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
